<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Preface</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-PREFACE-1.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-1.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="learnphpmysql-PREFACE-2"></a>
<h2 id="title-IDAF04MF" class="docPrefaceTitle">Preface</h2>
<p class="docText">PHP and MySQL are a powerful combination that together make it easy to create web applications. If you've been creating web pages but want to build more sophisticated sites that can grow and interact with users, PHP and MySQL let you build your foundations quickly, and subsequently build on them to meet your needs.</p>
<p class="docText">Our goal is to help you learn the ins and outs of PHP and MySQL and save you some of the "Why doesn't that work?" moments that we've already been through. We'll show you what to watch for and how to fix these issues without pulling out your hair.</p>
<a name="learnphpmysql-PREFACE-2-SECT-1"></a>
<h3 id="631368-943" class="docSection1Title">Audience</h3>
<a name="IDX-PREFACE-2-0001"></a> 

<p class="docText">This book is for people who want to know how to create dynamic web sites. That could include graphic designers who are already working in an IT firm or advertising firm creating static web sites, who may need to move forward with coding database-driven web sites. It might also include people who already know, say, Flash development and HTML markup, but need to expand their repertoire of skills to database and open source programming environments.</p>

<a name="learnphpmysql-PREFACE-2-SECT-2"></a>
<h3 id="631368-943" class="docSection1Title">Assumptions This Book Makes</h3>
<p class="docText">This book assumes you understand how web browsers work and have a basic understanding of HTML. Some understanding of JavaScript may be useful (for <a class="docLink" href="learnphpmysql-CHP-15.html#learnphpmysql-CHP-15">Chapter 15</a>) but isn't generally required.</p>
<p class="docText">You might also be over-qualified. If you already know how to create pages using MySQL and PHP, then you'd probably be better off with a book that is more a reference than a Learning book, such as one from the Nutshell series.</p>

<a name="learnphpmysql-PREFACE-2-SECT-3"></a>
<h3 id="631368-943" class="docSection1Title">Organization of This Book</H3>
<a name="IDX-PREFACE-2-0002"></a> 
<a name="IDX-PREFACE-2-0003"></a> 
<a name="IDX-PREFACE-2-0004"></a> 
<a name="IDX-PREFACE-2-0005"></a> 

<p class="docText">This book starts out with an overview of how all of the pieces you'll be working with fit together. Because there are multiple languages and technologies that interact to form the dynamic web pages, it's best to start with a solid foundation of how the pieces work together. The PHP that you'll learn works as a sort of a total integration package for dynamic web sites.</p>
<p class="docText">Next, we'll walk through installing the core software packages on your local computer. This book focuses on PHP and MySQL, but making this work also usually requires the Apache web server. The PHP interpreter works with the web server when processing dynamic content. Finally, you'll install the MySQL database. Installation is covered on the PC, Mac, and Linux systems. You can also use a hosted ISP account to develop your pages, if you don't want to install everything locally.</p>
<p class="docText">Since PHP plays an important role in pulling everything together, we take the time to explain the basics of working with the PHP language. This includes language essentials such as data types, program flow logic, and variables. Functions, arrays, and forms each get their own chapter to fully explore them.</P>
<p class="docText">Since you may be new to databases in general, we ease into MySQL by first explaining concepts that apply to designing and using any relational database. Then we give specific examples of using MySQL to interact with your data. Once you can get data in and out of the database, you'll need to work with PHP to integrate that data into your dynamic content.</P>
<p class="docText">Security and access control to your web pages each get their own chapter. While security may sound like a dull subject, it's still a huge issue if you store any information that's private on your web page. There are several common security pitfalls that we'll guide you around.</p>
<p class="docText">Finally, we close with sample applications that demonstrate how the technologies work together to rapidly build workable, fast web sites. You'll also learn where to look for additional information on the topics covered in the book.</P>

<a name="learnphpmysql-PREFACE-2-SECT-4"></a>
<h3 id="631368-943" class="docSection1Title">Supporting Books</h3>
<p class="docText">Even if you feel you are ready for this book, you may want to explore some of the XML technologies in greater depth than is possible here. The following list offers some good places to start:</p>
<UL><li><p class="docList"><span class="docEmphasis">Run Your Own Web Server Using Linux &amp; Apache</span>, by Tony Steidler-Dennison (SitePoint, 2005).</p></LI><li><p class="docList"><span class="docEmphasis">PHP in a Nutshell</span>, First Edition, by Paul Hudson (O'Reilly, 2005).</p></LI><li><p class="docList"><span class="docEmphasis">MySQL in a Nutshell</span>, First Edition, by Russell Dyer (O'Reilly, 2005).</p></li><li><p class="docList"><span class="docEmphasis">CSS Cookbook</span>, First Edition, by Christopher Schmitt (O'Reilly, 2004).</P></LI></ul>
<p class="docText">There are also several good online resources for dynamic web development, including onlamp.com, part of the O'Reilly Network. LAMP stands for Linux, Apache, MySQL, PHP. LAMP is the de facto standard for serving dynamic web pages.</p>

<a name="learnphpmysql-PREFACE-2-SECT-5"></a>
<h3 id="631368-943" class="docSection1Title">Conventions Used in This Book</h3>
<a name="IDX-PREFACE-2-0006"></a> 
<a name="IDX-PREFACE-2-0007"></a> 

<p class="docText">The following font conventions are used in this book:</P>
<dl class="docList">
<dt><br><P><span class="docPubcolor"><span class="docEmphasis">Italic</span></span></p></dt>
<dd><p class="docList">Indicates pathnames, filenames, and program names; Internet addresses, such as domain names and URLs; and new items where they are defined</P></dd>

<dt><BR><P><span class="docPubcolor"><span class="docPubcolor"><span class="docMonofont">Constant width</span></span></span></p></dt>
<dd><p class="docList">Indicates command lines and options that should be typed verbatim; names and keywords in programs, including method names, variable names, and class names; and HTML element tags</p></dd>

<dt><br><p><span class="docPubcolor"><span class="docEmphasis">Constant width bold</span></span></p></dt>
<dd><p class="docList">Indicates emphasis in program code lines</p></dd>

<dt><br><p><span class="docPubcolor"><tt><i>Constant width italic</i></tt></span></p></dt>
<dd><p class="docList">Indicates text that should be replaced with user-supplied values</p></dd>
</dl>
<p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><tr><TD><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><td width="60" valign="top"><img src="images/tip_yellow.jpg" width="50" height="54" alt=""></TD><TD valign="top">
<p class="docText">This icon signifies a tip, suggestion, or general note.</p>
</TD></tr></table></td></tr></table></P><br>
<p><table border="0" bgcolor="black" cellspacing="0" cellpadding="1" width="90%" align="center"><TR><td><table bgcolor="white" width="100%" border="0" cellspacing="0" cellpadding="6"><tr><TD width="60" valign="top"><img src="images/warning_yellow.jpg" width="51" height="36" alt=""></td><td valign="top">
<p class="docText">This icon indicates a warning or caution.</p>
</td></TR></table></TD></tr></table></p><br>

<a name="learnphpmysql-PREFACE-2-SECT-6"></a>
<h3 id="631368-943" class="docSection1Title">Using Code Examples</H3>
<p class="docText">This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you're reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O'Reilly books <span class="docEmphasis">does</span> require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product's documentation <span class="docEmphasis">does</span> require permission.</p>
<p class="docText">We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: "<span class="docEmphasis">Learning PHP and MySQL</span> by Michele E. Davis and Jon A. Phillips. Copyright 2006 O'Reilly Media, Inc., 0-596-10110-4."</P>
<p class="docText">If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at <span class="docEmphasis">permissions@oreilly.com</span>.</p>

<a name="learnphpmysql-PREFACE-2-SECT-7"></a>
<H3 id="631368-943" class="docSection1Title">Safari&#174; Enabled</H3>
<a name="IDX-PREFACE-2-0008"></a> 

<p class="docText"><img border="0" alt="" id="195131084199" width="105" height="78" SRC="images/safarienabled.jpg"> When you see a Safari&#174; Enabled icon on the cover of your favorite technology book, that means the book is available online through the O'Reilly Network Safari Bookshelf.</P>
<p class="docText">Safari offers a solution that's better than e-books. It's a virtual library that lets you easily search thousands of top tech books, cut and paste code samples, download chapters, and find quick answers when you need the most accurate, current information. Try it for free at <a class="docLink" target="_blank" href="http://safari.oreilly.com">http://safari.oreilly.com</a>.</p>

<a name="learnphpmysql-PREFACE-2-SECT-8"></a>
<h3 id="631368-943" class="docSection1Title">How to Contact Us</h3>
<p class="docText">We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made a few mistakes!) Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:</p>
<blockquote>
<p class="docText">O'Reilly Media, Inc.</p>
<p class="docText">1005 Gravenstein Highway North</p>
<p class="docText">Sebastopol, CA 95472</p>
<p class="docText">800-998-9938 (in the U.S. or Canada)</p>
<p class="docText">707-829-0515 (international/local)</p>
<p class="docText">707-829-0104 (fax)</p>
</blockquote>
<p class="docText">We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at:</p>
<blockquote>
<p class="docText"><a class="docLink" target="_blank" href="http://www.oreilly.com/catalog/learnphpmysql/">http://www.oreilly.com/catalog/learnphpmysql/</a></p>
</blockquote>
<p class="docText">To comment or ask technical questions about this book, send email to:</p>
<blockquote>
<p class="docText"><a class="docLink" href="mailto:bookquestions@oreilly.com">bookquestions@oreilly.com</a></p>
</blockquote>
<p class="docText">For more information about our books, conferences, Resource Centers, and the O'Reilly Network, see our web site at:</P>
<blockquote>
<p class="docText"><a class="docLink" target="_blank" href="http://www.oreilly.com">http://www.oreilly.com</a></p>
</blockquote>

<a name="learnphpmysql-PREFACE-2-SECT-9"></a>
<h3 id="631368-943" class="docSection1Title">Acknowledgments</H3>
<p class="docText">First, we'd like to thank our wonderful agent, Matt Wagner of Fresh Books, for bringing such a fabulous opportunity to the table for us. The opportunity to write for O'Reilly Media was a great honor. As technologists, our bookcase is already well populated with animals from the Nutshell series.</P>
<p class="docText">Thanks to our O'Reilly developmental editors, Brett McLaughlin and Simon St.Laurent. This book wouldn't be what it is without both of their help working with us. Second, profuse thanks to our technical editors, especially Jereme Allen and Christopher Finke, whom we met through our local Minneapolis/St. Paul PHP community: <a class="docLink" target="_blank" href="http://www.tcphp.org">http://www.tcphp.org</a>. Technical edit thanks also go to our last technical editor, Patrick Krekelberg.</p>


</TD></TR></table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-PREFACE-1.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=learnphpmysql-CHP-1.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<script type="text/javascript"><!--
google_ad_client = "pub-0203281046321155";
google_alternate_ad_url = "http://www.bookhtml.com/adbrite.htm";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="4867465545";
google_color_border = "FFFFFF";
google_color_link = "0000FF";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</html>
